package com.wentao.thisConsume.controller;

import com.wentao.thisCommon.model.RequestBase;
import com.wentao.thisCommon.model.ResultBase;
import com.wentao.thisConsume.domain.CompanyCustValTemp;
import com.wentao.thisFacade.domain.reqeust.*;
import com.wentao.thisFacade.domain.result.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@FeignClient("WENTAO")
@RequestMapping(value = "/base")
@RestController
public interface BaseConsume {

    /**
     * 获取数据库配置的基本信息
     *
     * @param entity 查询条件封装
     * @return 数据库配置
     */
    @PostMapping("/SearchSettingList")
    ResultBase<List<SettingMapResult>> searchSettingList(@RequestBody RequestBase<SearchSettingListRequest> entity);

    /**
     * 酒店审核/酒店资料分页查询
     *
     * @param entity 查询条件封装
     * @return 分页结果
     */
    @PostMapping("/SearchHotelGetRegList")
    ResultBase<CompanyCustomPageResult> searchHotelGetRegList(@RequestBody RequestBase<HotelPageRequest> entity);

    /**
     * 酒店详情
     *
     * @param entity 查询条件封装
     * @return 酒店详情
     */
    @PostMapping("/SearchHotelGetInfo")
    ResultBase<CompanyCustomResult> searchHotelGetInfo(@RequestBody RequestBase<HotelInfoRequest> entity);

    /**
     * 审核酒店
     *
     * @param entity 条件封装
     * @return 审核结果true/false
     */
    @PostMapping(value = "/VerifyCompany")
    ResultBase<Boolean> verifyCompany(@RequestBody RequestBase<VerifyCompanyRequest> entity);

    /**
     * 订单查询分页
     *
     * @param entity 查询订单（订单编号和收货人手机号，动态条件）
     * @return 订单分页信息
     */
    @PostMapping("/BasePageOrder")
    ResultBase<OrderInfoPageResult> basePageOrder(@RequestBody RequestBase<SearchOrderPageRequest> entity);

    /**
     * 根据订单id查询订单详情
     *
     * @param entity 订单id封装
     * @return 订单详情
     */
    @PostMapping("/BaseOrderInfo")
    ResultBase<OrderInfoResult> baseOrderInfo(@RequestBody RequestBase<SearchOrderInfoRequest> entity);

    /**
     * 订单确认发货（填写快递单号和快递公司）
     *
     * @param entity 订单id+快递单号+快递公司
     * @return 订单详情
     */
    @PostMapping("/OrderDeliver")
    ResultBase<OrderInfoResult> orderDeliver(@RequestBody RequestBase<OrderDeliverRequest> entity);

    /**
     * 获取省市区县三级层级列表
     *
     * @return 省市区县三级列表
     */
    @PostMapping("/ListThreeLevelLocation")
    ResultBase<List<LocationProvinceResult>> listThreeLevelLocation();

    /**
     * 合伙人/业务员查询分页
     *
     * @param entity 查询条件
     * @return 合伙人分页信息
     */
    @PostMapping(value = "/PagePartner")
    ResultBase<PartnerPageResult> pagePartner(@RequestBody RequestBase<PartnerRequest> entity);

    /**
     * 根据地址定位id查询合伙人信息
     *
     * @param entity 查询条件
     * @return 合伙人信息
     */
    @PostMapping(value = "/ListParentPartnerByLocation")
    ResultBase<List<PartnerResult>> listParentPartnerByLocation(@RequestBody RequestBase<PartnerRequest> entity);

    /**
     * 添加合伙人/业务员
     *
     * @param entity 合伙人/业务员信息
     * @return 添加结果
     */
    @PostMapping(value = "/SavePartner")
    ResultBase<Boolean> savePartner(@RequestBody RequestBase<PartnerRequest> entity);

    /**
     * 更新合伙人/业务员
     *
     * @param entity 合伙人/业务员信息
     * @return 更新结果
     */
    @PostMapping(value = "/UpdatePartner")
    ResultBase<Boolean> updatePartner(@RequestBody RequestBase<PartnerRequest> entity);

    /**
     * 删除合伙人/业务员
     *
     * @param entity 合伙人/业务员id
     * @return 删除结果
     */
    @PostMapping(value = "/DeletePartner")
    ResultBase<Boolean> deletePartner(@RequestBody RequestBase<PartnerRequest> entity);

    /**
     * 业绩管理
     *
     * @param entity 查询条件封装
     * @return 业绩信息
     */
    @PostMapping("/PerformanceList")
    ResultBase<PerformanceVal> performanceList(@RequestBody RequestBase<PerformanceListRequest> entity);

}